<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:p="http://primefaces.org/ui"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:security="http://www.springframework.org/security/tags"
                template="/templates/template.xhtml">
    <ui:define name="title">新增会员权益分类</ui:define>
    <ui:define name="content">
        <h:form id="rightsInfoForm" enctype="multipart/form-data">
            <div class="topbar clearfix"
                 style="background: -webkit-linear-gradient(top,#f6f7f9 0,#ebedf0 100%);">
                <p:toolbar>
                    <f:facet name="right">
                        <p:commandButton value="编辑" icon="fa fa-edit"
                                         actionListener="#{classificationAddBean.changeStatusToEdit}"
                                         process="@this"
                                         update="@form"
                                         rendered="#{classificationAddBean.isView()}"/>
                        <p:commandButton value="保存" icon="fa fa-save"
                                         actionListener="#{classificationAddBean.onSave}"
                                         update="@form" rendered="#{classificationAddBean.isNotView()}"/>
                        <p:button value="返回" icon="fa fa-reply-all" href="#{currentUserBean.back}"/>
                    </f:facet>
                </p:toolbar>
            </div>

            <div class="ui-fluid" style="padding-top: 30px;">
                <div class="ui-g-12">
                    <div class="card">
                        <div class="ui-g">
                        <div class="ui-g-2"><p:outputLabel for="id" value="分类编号"/></div>
                        <div class="ui-g-4">
                            <p:inputText id="id" value="#{classificationAddBean.$.id}" disabled="true"/>
                        </div>
                        <div class="ui-g-6"/>

                        <div class="ui-g-2"><p:outputLabel for="name" value="分类名称"/></div>
                        <div class="ui-g-4">
                            <p:inputText id="name" value="#{classificationAddBean.$.classif_name}" disabled="#{classificationAddBean.isView()}"/>
                        </div>
                        <div class="ui-g-6"/>

                        <div class="ui-g-2"><p:outputLabel for="approvalType" value="状态"/></div>
                        <div class="ui-g-4">
                            <p:selectOneMenu id="approvalType" value="#{classificationAddBean.$.status}"
                                             filter="true" disabled="#{classificationAddBean.isView()}"
                                             filterMatchMode="contains">
                                <f:selectItem itemLabel="- 请选择 -" itemValue="" noSelectionOption="true"/>
                                <f:selectItems
                                        value="#{classificationAddBean.dictionaries[DictionaryCode.ONLINE_OFFLINE_STATUS]}"
                                        var="dic"
                                        itemLabel="#{dic.name}" itemValue="#{dic.value1}"/>
                            </p:selectOneMenu>
                        </div>
                        <div class="ui-g-6"/>

                        <div class="ui-g-2"><p:outputLabel for="show" value="是否特殊展示"/></div>
                        <div class="ui-g-4">
                            <p:inputSwitch id="show" value="#{classificationAddBean.$.special_show}" offLabel="否" onLabel="是" disabled="#{classificationAddBean.isView()}"/>
                        </div>
                        <div class="ui-g-6"/>


                        <div class="ui-g-2"><p:outputLabel for="dayLimitClickUv" value="排序"/></div>
                        <div class="ui-g-4">
                            <p:inputNumber id="dayLimitClickUv" value="#{classificationAddBean.$.sort}" disabled="#{classificationAddBean.isView()}"/>
                        </div>
                        <div class="ui-g-6"/>
                        </div>
                            <!--<p:outputLabel for="id" value="分类编号"/>-->
                            <!--<p:inputText id="id" value="#{classificationAddBean.$.id}" disabled="#{classificationAddBean.isView()}"/>-->

                            <!--<p:outputLabel for="name" value="分类名称"/>-->
                            <!--<p:inputText id="name" value="#{classificationListBean.$.classif_name}"/>-->

                            <!--<p:outputLabel for="approvalType" value="状态"/>-->
                            <!--<p:selectOneMenu id="approvalType" value="#{classificationListBean.$.status}"-->
                                             <!--filter="true"-->
                                             <!--filterMatchMode="contains">-->
                                <!--&lt;!&ndash;<f:selectItem itemLabel="- 请选择 -" itemValue="" noSelectionOption="true"/>&ndash;&gt;-->
                                <!--<f:selectItems-->
                                        <!--value="#{classificationListBean.dictionaries[DictionaryCode.ONLINE_OFFLINE_STATUS]}"-->
                                        <!--var="dic"-->
                                        <!--itemLabel="#{dic.name}" itemValue="#{dic.value1}"/>-->
                            <!--</p:selectOneMenu>-->

                            <!--<p:outputLabel for="show" value="是否特殊展示"/>-->
                            <!--<p:inputSwitch id="show" value="#{classificationListBean.$.special_show}" offLabel="否" onLabel="是" />-->

                            <!--<p:outputLabel for="dayLimitClickUv" value="排序"/>-->
                            <!--<p:inputText id="dayLimitClickUv" value="#{classificationListBean.$.sort}"/>-->
                    </div>
                </div>
            </div>
        </h:form>
    </ui:define>
</ui:composition>